<html template="../templates/3-layoutTemplate.xhtml" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui" > 
    <h:head>
        <title>Test History</title>
        <meta name="viewport" content="width=device-width"/>
        <link type="text/css" rel="stylesheet"	href="../css/default.css" />        
    </h:head>
    <h:body>
        <div style="padding: 2px; border: 1px;" >
            <p:panel style="margin: 5px;width: 450px;height: 425px; border: 1px solid #036fab; float: left">
                <p:dataTable var="test" 
                             id="testHistoryDataTable"
                             value="#{registeredUsersDashboardBean.testHistoryList}"
                             paginator="true" rows="10"
                             rowKey="#{test.testHistoryId}"
                             selectionMode="single"
                             > 

                    <p:column headerText="Test Name">  
                        <h:outputText value="#{test.testName}" style="width:25%"/>  
                    </p:column>
                    <p:column headerText="Test Date">  
                        <h:outputText value="#{test.testDate}" style="width:25%"/>  
                    </p:column>
                    <p:column headerText="Result" style="text-align: center">  
                        <p:graphicImage alt="Result" value="/images/led#{test.result}.png" cache="false" width="30" />
                    </p:column>


                </p:dataTable>
            </p:panel>
            <p:panel style="margin: 5px;width: 255px;height: 425px; float : right;">

                <p:panel style="margin: 5px;width: 210px;height: 200px; border: 1px solid #036fab; float: left;">
                    <p:lineChart id="linear" value="#{chartBean.linearModel}"   
                                 title="Linear Chart" minY="0" maxY="10" style="height: 180px;"/>
                </p:panel>
                <p:panel style="margin: 5px;width: 210px;height: 180px; border: 1px solid #036fab; float: left;">
                    <p:barChart id="basic" value="#{chartBean.categoryModel}"   
                                title="Basic Bar Chart" min="0" max="200" style="height:150px"/> 
                </p:panel>

            </p:panel>
        </div>
    </h:body>
</html>
